The simplest C statement is the NULL STATEMENT, a lone semicolon. This is occasionally used when a loop body does not require any expressions, as shown later in this chapter. An EXPRESSION STATEMENT is an expression followed by a semicolon:
2 + 2; /* useless statement */
Notice that the value of the expression is ignored. A more useful such statement is one whose expression has a "side effect" like assigning a value or evaluating a function!
int a; /* declaration */
a = 2 + 2;
printf("result: %d\n",a);
This chapter begins with a discussion on grouping expression statements and goes on to discuss C's control flow statements for conditional execution and looping. The 'return' statement to terminate a function was already discussed in Chapter 3.